package online.heycm.platform.rocketmq.consumer;

import online.heycm.platform.rocketmq.common.entity.Constant;
import online.heycm.platform.rocketmq.common.entity.Event;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;

/**
 * 顺序事件监听
 *
 * @author heycm
 * @since 2023/12/9 14:54
 */
@RocketMQMessageListener(topic = "${rocketmq.topic}" + Constant.ORDERLY_SUFFIX,
        consumerGroup = "${rocketmq.topic}" + Constant.ORDERLY_SUFFIX, consumeMode = ConsumeMode.ORDERLY)
public class OrderlyListener implements RocketMQListener<Event> {

    @Override
    public void onMessage(Event event) {
        EventRegistry.onMessage(event);
    }
}
